<template>
    <div>
        <el-tabs v-model="currentTab" type="card" class="center-tabs">
            <el-tab-pane label="顾客详情" name="customerDetails" />
            <el-tab-pane label="随访记录" name="followRecord" />
        </el-tabs>
        <div v-show="currentTab === 'customerDetails'">
            <CustomerDetails :basicInfo="baseInfo" v-if="currentTab === 'customerDetails'"></CustomerDetails>
        </div>
        <div v-show="currentTab === 'followRecord'">
            <addRecord :basicInfo="baseInfo" v-if="currentTab === 'followRecord'" @closeFollow="closeRecord"></addRecord>
        </div>
    </div>
</template>

<script>
import { mapGetters } from "vuex";
import addRecord from '@/views/components/followUp/addRecord'
import CustomerDetails from '@/views/components/customerDetail/customerDetail'
export default {
    name: "followRecord",
    components: { CustomerDetails,addRecord },
    props: ['baseInfo'],
    data() {
        return {
            currentTab: 'followRecord',
        };
    },
    watch: {},
    created() {

    },
    computed: {
        isAdmin() {
            return this.$store.state.user.name === 'admin' ? true : false
        }
    },
    mounted() {
      
    },

    methods: {
        closeRecord(){
            this.$emit('closefollowAddDialogVisible')
        }
    },
};
</script>
<style scoped>

</style>
